#include <iostream>
#include <string>
using namespace std;

class Shape {
public:
    virtual float area() const;
    virtual float volume() const;
    virtual void shapeName() const = 0;
};

class Point : public Shape {
public:
    Point(int x, int y)
    {
        pointX = x;
        pointY = y;
    }
    ~Point(){};
    void shapeName() const
    {
        cout << "this is point" << endl;
    }
    friend ostream& operator<<(ostream& out, const Point& point);
protected:
    int pointX;
    int pointY;
};

class Circle : public Point {
public:
    Circle(int x, int y, int r) : Point(x, y)
    {
        ra = r;
    }
    Circle(int x, int y) : Point(x, y){};
    ~Circle(){};
    float area() const;
    void shapeName()
    {
        cout << "this is Circle" << endl;
    }
    friend ostream& operator<<(ostream& out, const Circle& circle);
private:
    int ra;
};

class Cylinder : public Circle {
public:
    Cylinder(int x, int y, int h) : Circle(x, y)
    {
        high = h;
    }
    ~Cylinder(){};
    float volume() const;
    void shapeName()
    {
        cout << "this is Cylinder" << endl;
    }
    friend ostream& operator<<(ostream& out, const Cylinder& cylinder);
private:
    int high;
};

class Student {
public:
    Student(int nu, string na, char se) : num(nu), name(na), sex(se){};
    virtual void display();
private:
    int num;
    string name;
    char sex;
};
class Graduate : public Student {
public:
    Graduate(int nu, string na, char se, float wa) : Student(nu, na, se), wage(wa){};
    void display();
private:
    float wage;
};
class Point3 {
public:
    Point3(){};
    virtual ~Point3()
    {
        cout << "this is ~Point3" << endl;
    }
};
class Circle2 : public Point3 {
public:
    Circle2(){};
    ~Circle2()
    {
        cout << "this is ~Circle" << endl;
    }
private:
    int age;
};